﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/QuanLy.Master" AutoEventWireup="true" CodeBehind="SuaHocVien.aspx.cs" Inherits="DT5_Anh09110006_Hung09110044_Vu09110157.QuanLy.SuaHocVien" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Sửa Học Viên</title>
 <style type="text/css">
        .style1
        {
            width: 100px;
            padding-left: 20px;
            height:30px;
        }
        .style2
        {
            width:auto;
            height:30px;
        }
         #qlhv
        {
            background: url("../Image/menu_focus.png") no-repeat scroll transparent;
            color: #FFFFFF;
            left: -6px;
            padding: 19px 18px 19px 25px;
        }
    </style>
    <link rel="stylesheet" href="../Styles/jquery-ui.css" />
    <script src="../Scripts/jquery-1.8.3.js"></script>
    <script src="../Scripts/jquery-ui.js"></script>
    <script>
        $(function () {
            $("#txtNgaySinh").datepicker({
                changeMonth: true,
                changeYear: true,
                minDate: "-100Y",
                maxDate: "-10Y"
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1 style="padding-left: 40px">
        Trang Chỉnh Sửa Học Viên</h1>
    <table style="margin:10px 20px 10px 20px;width:95%" cellpadding="10px">
        <tr>
            <td colspan="2">
                <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="SuaHocVien" runat="server"
                    ForeColor="Red" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server" GroupingText="Thông tin chính" >
                    <table style="margin-left: 20px" cellpadding="5px">
                        <tr>
                            <td class="style1">
                                Mã học viên:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtMaHV" runat="server" Width="200px" Enabled="False" />                              
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Họ và Tên:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtHoTenHV" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Nhập họ tên học viên"
                                    ControlToValidate="txtHoTenHV" ValidationGroup="SuaHocVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Ngày Sinh:
                            </td>
                            <td class="style2">
                                <input type="text" id="txtNgaySinh" style="width: 200px" name="txtNgaySinh" value="<%=this.GiaTriNgaySinh %>" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Địa Chỉ:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtDiaChiHV" runat="server" Width="200px" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Nhập địa chỉ học viên"
                                    ControlToValidate="txtDiaChiHV" ValidationGroup="SuaHocVien" Text="*" ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Giới Tính:
                            </td>
                            <td class="style2">
                                <asp:DropDownList ID="ddlGioiTinhHV" runat="server" Width="205px">
                                    <asp:ListItem>Nam</asp:ListItem>
                                    <asp:ListItem>Nữ</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
            <td>
                <asp:Panel ID="Panel2" runat="server" GroupingText="Thông tin phụ thêm">
                    <table style="margin-left: 20px" cellpadding="5px">
                        <tr>
                            <td class="style1">
                                Điện Thoại:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtDienThoaiHV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtDienThoaiHV"
                                    ErrorMessage="Điện thoại nhập không chính xác" ForeColor="Red" ValidationGroup="SuaHocVien"
                                    ValidationExpression="0(\d{9})(\d{1})?" Text="*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                CMND:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtCMNDHV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCMNDHV"
                                    ErrorMessage="CMND nhập không chính xác" ForeColor="Red" ValidationGroup="SuaHocVien"
                                    ValidationExpression="\d{9}" Text="*"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Email:
                            </td>
                            <td class="style2">
                                <asp:TextBox ID="txtEmailHV" runat="server" Width="200px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtEmailHV"
                                    ErrorMessage="Email nhập không chính xác" ForeColor="Red" ValidationGroup="SuaHocVien"
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                            </td>
                            <td class="style2">
                                <asp:Button ID="btnSuaHV" Text="Cập nhật" runat="server"  Width="100px"
                                    ValidationGroup="SuaHocVien" CssClass="btnCapNhat" onclick="btnSuaHV_Click" />
                                &nbsp;<asp:Button ID="btnHuy" Text="Hủy" runat="server" Width="100px" 
                                    CssClass="btnHuy" onclick="btnHuy_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                            </td>
                            <td class="style2">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
